From 475f8224ff5a3e9471eb843eae5598665ec0b5ab Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Fri, 26 Nov 2021 02:13:30 +0100
Subject: [PATCH] portable install(1) usage

---
 src/Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 37ae219..d681dfd 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -58,10 +58,12 @@ $(libname): $(libaio_sobjs) libaio.map
 	$(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
 
 install: $(all_targets)
-	install -D -m 644 libaio.h $(includedir)/libaio.h
-	install -D -m 644 libaio.a $(libdir)/libaio.a
+	install -d -m 755 $(includedir)
+	install -d -m 755 $(libdir)
+	install -m 644 libaio.h $(includedir)/libaio.h
+	install -m 644 libaio.a $(libdir)/libaio.a
 ifeq ($(ENABLE_SHARED),1)
-	install -D -m 755 $(libname) $(libdir)/$(libname)
+	install -m 755 $(libname) $(libdir)/$(libname)
 	ln -sf $(libname) $(libdir)/$(soname)
 	ln -sf $(libname) $(libdir)/libaio.so
 endif
-- 
2.34.0

